package com.ybb.production.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yubb.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 裁单信息对象 garment_production_cutting_bed_info
 *
 * @author ruoyi
 * @date 2023-09-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class GarmentProductionCuttingBedDTO extends BaseEntity {

    /**
     * 裁单id
     */
    @ApiModelProperty(value = "裁单id")
    private Long id;

    /**
     * 订单id
     */
    @ApiModelProperty(value = "订单id")
    @NotNull(message = "订单id不能为空")
    private Long orderId;

    /**
     * 床号
     */
    @ApiModelProperty(value = "床号")
    private String bedNo;

    /**
     * 交货日期
     */
    @ApiModelProperty(value = "交货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    private Date deliveryTime;

    /**
     * 裁剪日期
     */
    @ApiModelProperty(value = "裁剪日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    private Date cutDate;

    /**
     * 颜色
     */
    @ApiModelProperty(value = "颜色")
    private String color;

    @ApiModelProperty(value = "尺码")
    private String size;

    @ApiModelProperty(value = "编菲类型（1代表方式一，2代表方式二）")
    private String bianfeiType;

    @ApiModelProperty(value = "编菲信息")
    private List<BianfeiDTO> bianfeiList;

    private String delFlag;

    @Data
    public static class BianfeiDTO {
        @ApiModelProperty(value = "扎号")
        private Long bundleNo;
        @ApiModelProperty(value = "颜色")
        private String color;
        @ApiModelProperty(value = "匹号")
        private String boltNo;
        @ApiModelProperty(value = "尺码")
        private String size;
        @ApiModelProperty(value = "数量")
        private Long quantity;
    }

}
